using System;
using System.Collections.Generic;
using System.Text;
using PH.Common;
using Hoshimi._IA_;
using System.Diagnostics;
using System.Drawing;

namespace Hoshimi._Map_._Objective_
{
    public class HoshimiObjectivePoint : ObjectivePoint
    {
        public static Dictionary<byte, HoshimiObjectivePoint> myHoshimiObjective {get { return myMapManager.HoshimiObjectives;}}

        // METHODES
        public static HoshimiObjectivePoint GetNearestHoshimiPoint(Point point, ref PathFinderConfig pathFinderConfig)
        {
            return ObjectivePoint.GetNearestObjective<HoshimiObjectivePoint>(point, myHoshimiObjective, ref pathFinderConfig);
        }

		public static HoshimiObjectivePoint GetNearestHoshimiPoint(Point point, ref PathFinderConfig pathFinderConfig, out int cost)
        {
            return ObjectivePoint.GetNearestObjective<HoshimiObjectivePoint>(point, myHoshimiObjective, ref pathFinderConfig, out cost);
        }

		protected override bool IsValidObjective()
		{
			if(EnnemyStatus.IsNeedleLocationTakenByEnemy(this.mLocation))
			{
				return false;
			}

			if(myMapManager.IsInNeuroControllerAttackZone(this.mLocation) != null)
			{
				return false;
			}

			if (myStrategyManager.myAIGroup.myAIBot.IsOpponentWillTakeMyNeedle(this.mLocation))
			{
				return false;
			}

			return (!myMapManager.NeedlePoints.Contains(this.mLocation));
		}

        // Ctor
        public HoshimiObjectivePoint(Point point)
            : base (point)
        {

        }
    }
}
